home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Code Resources / Jims CDEFs 1.50 / CDEF Source / source / jimsCDEF.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  5.8 KB  |  166 lines  |  [TEXT/KAHL]

  1. //------------------------- © 1994-1995 by James G. Stout ----------------------
  2. //    File        : jimsCDEF.h
  3. //    Date        : September 24, 1994
  4. //    Author        : Jim Stout
  5. //    Purpose        : Various #defines and structs useful with jim's CDEF's
  6. // -----------------------------------------------------------------------------
  7.  
  8. // -----------------------------------------------------------------------------
  9. // the resource id's for the CDEFS
  10. // -----------------------------------------------------------------------------
  11. #define groupBox    1100
  12. #define popUp        1101
  13. #define spinner        1102
  14. #define dateTime    1103
  15. #define togCDEF        1104
  16. #define hSlider        1105
  17. #define vSlider        1106
  18. #define button3D    1107
  19. #define progBar        1108
  20. #define tabPanel    1109
  21. #define slider        1110
  22. #define rectButton    1111
  23. #define grayButton    1112
  24.  
  25. // -----------------------------------------------------------------------------
  26. // varCodes for all CDEFS
  27. // -----------------------------------------------------------------------------
  28.  
  29. #define ctl3D            0x0002            // 3D control appearance
  30. #define useWFont        0x0008            // draw control with window font
  31. // -----------------------------------------------------------------------------
  32. // varCodes for GroupBox CDEF
  33. // -----------------------------------------------------------------------------
  34. #define grayLine        0x0001            // gray pattern box
  35. #define insetBox        0x0004            // a 3D, inset box (must have non-white bg)
  36.  
  37. // -----------------------------------------------------------------------------
  38. // varCodes for popUp CDEF
  39. // -----------------------------------------------------------------------------
  40.  
  41. #ifndef popupTitleLeftJust
  42.  
  43. // special meanings for contrlValue field
  44.  
  45. #define popupTitleLeftJust        0x0000
  46. #define popupTitleCenterJust    0x0001
  47. #define popupTitleRightJust        0x00FF
  48.  
  49. // variation codes
  50.  
  51. #define popupFixedWidth            0x0001
  52. #define popupUseAddResMenu        0x0004
  53. #define popupUseWFont            0x0008
  54.  
  55. #endif
  56.  
  57. // extended variation codes if combined with contrlMax field
  58.  
  59. #define popupNoTitle            0x0000
  60. #define popupNoMark                0x0100
  61. #define popupInsetFrame            0x0200
  62. #define popupBlackSymbol        0x0400
  63. #define popupSymbolOnly            0x0800
  64. #define popupNoSymbol            0x1000
  65. #define popupIconOnly            0x2000
  66. #define popupCenterText            0x4000
  67. #define popupNoDeleteMenu        0x8000
  68.  
  69. // -----------------------------------------------------------------------------
  70. // varCodes for spinner CDEF
  71. // -----------------------------------------------------------------------------
  72.  
  73. #define bigArrows        0x0001
  74. #define horizArrows        0x0004
  75.  
  76. #define aHt        20                // minimum height & width for arrows
  77. #define aWid    13
  78. #define aHtBig    27
  79. #define aWidBig    17
  80.  
  81. // -----------------------------------------------------------------------------
  82. // varCodes for dateTime CDEF
  83. // -----------------------------------------------------------------------------
  84.  
  85. #define dateOnly    0x0001        // show date, left justified in control rect    
  86. #define timeOnly    0x0002        // show time, right justified in control rect    
  87. #define dtStack        0x0004        // show both on 2 lines, date then time    
  88.  
  89. #define only24        1            // for Max, sets dateTime CDEF to 24 hour display
  90.  
  91. // -----------------------------------------------------------------------------
  92. // varCodes for hSlider CDEF
  93. // -----------------------------------------------------------------------------
  94.  
  95. #define scaleNoFill      0x0001
  96. #define scaleGray        0x0004
  97.  
  98. #define hHt                24
  99. #define hWid            121
  100.  
  101. // -----------------------------------------------------------------------------
  102. // varCodes for vSlider CDEF
  103. // -----------------------------------------------------------------------------
  104.  
  105. #define scaleNoFill      0x0001
  106. #define thumbNoSnap        0x0004
  107. #define scaleBlank        0x0008
  108.  
  109. #define vHt                12
  110. #define vWid            105
  111.  
  112. // -----------------------------------------------------------------------------
  113. // varCodes for button3D CDEF
  114. // -----------------------------------------------------------------------------
  115.  
  116. #define useWBG            0x0004            // draw 3D push button with back color
  117.  
  118. // -----------------------------------------------------------------------------
  119. // varCodes for progBar CDEF
  120. // -----------------------------------------------------------------------------
  121.  
  122. #define vertBar            0x0001
  123. #define roundBar        0x0002
  124. #define barberPole        0x0004
  125.  
  126. // -----------------------------------------------------------------------------
  127. // varCodes for tabPanel CDEF
  128. // -----------------------------------------------------------------------------
  129.  
  130. #define sysFontTabs        0x0001
  131. #define oneTabRow        0x0002
  132.  
  133. // -----------------------------------------------------------------------------
  134. // varCodes for slider CDEF
  135. // -----------------------------------------------------------------------------
  136.  
  137. #define    narrowScale        0x0001    // scale is 4 pixels smaller than control Rect
  138. #define narrowScale2    0x0002    // scale is 8 pixels smaller
  139. #define filledScale        0x0004    // scale filled with cTingeDark
  140. #define snapToScale        0x0008    // click on scale moves thumb to that point
  141.  
  142. #ifndef REZ                        // Think6 Rez doesn't like the following
  143. //------------------------------------------------------------------------------
  144. // Spinner CDEF private data structure    
  145. //      increment and DITL itemNum are passed into the control as 
  146. //        LoWord & HiWord of the control RefCon            
  147. //------------------------------------------------------------------------------
  148.  
  149. typedef struct {
  150. short        increment;            // initial, requested increment value    
  151. short        itemNum;            // DITL editText item number for call to SetIText
  152. long        userData;            // user supplied data
  153. }Spin,*SpinPtr,**SpinHandle;
  154.  
  155. //------------------------------------------------------------------------------
  156. // Popup Menu CDEF private data structure    
  157. //  N.B. : The following structure is NOT the same as Apple's.
  158. //            It does match, for the first 2 elements.
  159. //------------------------------------------------------------------------------
  160.             
  161. typedef struct{
  162. MenuHandle    mHandle;                        // handle to the menu         
  163. int            mId;                            // resource id of menu        
  164. }popUpPrivateData,**popUpPrivateDataH;
  165.  
  166. #endif // REZ